package com.hz.dao;


import com.hz.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author slj
 */
@Repository
public interface UserDao {


    @Select("select * from smbms_user where user_name=#{userName} and password=#{userPassword}")
    public User loginUser(@Param("userName") String userName, @Param("userPassword") String userPassword);


    @Select("select id,user_name as userName,password as userPassword  from smbms_user")
    public List<User> findUserList();

    @Insert("insert into smbms_user (user_name,password) values (#{userName},#{userPassword})")
    public Integer insertUser(@Param("userName") String userName, @Param("userPassword") String userPassword );

    Integer batchInsert(@Param("list") List<User> users);


}
